/*
 * XML Type:  FindBillerResponse
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.FindBillerResponse
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML FindBillerResponse(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class FindBillerResponseImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.FindBillerResponse
{
    
    public FindBillerResponseImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName DTUPDATE$0 = 
        new javax.xml.namespace.QName("", "DTUPDATE");
    private static final javax.xml.namespace.QName BILLERINFO$2 = 
        new javax.xml.namespace.QName("", "BILLERINFO");
    
    
    /**
     * Gets the "DTUPDATE" element
     */
    public java.lang.String getDTUPDATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DTUPDATE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "DTUPDATE" element
     */
    public net.ofx.types.x2003.x04.DateTimeType xgetDTUPDATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DateTimeType target = null;
            target = (net.ofx.types.x2003.x04.DateTimeType)get_store().find_element_user(DTUPDATE$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "DTUPDATE" element
     */
    public void setDTUPDATE(java.lang.String dtupdate)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DTUPDATE$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DTUPDATE$0);
            }
            target.setStringValue(dtupdate);
        }
    }
    
    /**
     * Sets (as xml) the "DTUPDATE" element
     */
    public void xsetDTUPDATE(net.ofx.types.x2003.x04.DateTimeType dtupdate)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DateTimeType target = null;
            target = (net.ofx.types.x2003.x04.DateTimeType)get_store().find_element_user(DTUPDATE$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.DateTimeType)get_store().add_element_user(DTUPDATE$0);
            }
            target.set(dtupdate);
        }
    }
    
    /**
     * Gets array of all "BILLERINFO" elements
     */
    public net.ofx.types.x2003.x04.BillerInfo[] getBILLERINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(BILLERINFO$2, targetList);
            net.ofx.types.x2003.x04.BillerInfo[] result = new net.ofx.types.x2003.x04.BillerInfo[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "BILLERINFO" element
     */
    public net.ofx.types.x2003.x04.BillerInfo getBILLERINFOArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BillerInfo target = null;
            target = (net.ofx.types.x2003.x04.BillerInfo)get_store().find_element_user(BILLERINFO$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "BILLERINFO" element
     */
    public int sizeOfBILLERINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(BILLERINFO$2);
        }
    }
    
    /**
     * Sets array of all "BILLERINFO" element
     */
    public void setBILLERINFOArray(net.ofx.types.x2003.x04.BillerInfo[] billerinfoArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(billerinfoArray, BILLERINFO$2);
        }
    }
    
    /**
     * Sets ith "BILLERINFO" element
     */
    public void setBILLERINFOArray(int i, net.ofx.types.x2003.x04.BillerInfo billerinfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BillerInfo target = null;
            target = (net.ofx.types.x2003.x04.BillerInfo)get_store().find_element_user(BILLERINFO$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(billerinfo);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "BILLERINFO" element
     */
    public net.ofx.types.x2003.x04.BillerInfo insertNewBILLERINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BillerInfo target = null;
            target = (net.ofx.types.x2003.x04.BillerInfo)get_store().insert_element_user(BILLERINFO$2, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "BILLERINFO" element
     */
    public net.ofx.types.x2003.x04.BillerInfo addNewBILLERINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BillerInfo target = null;
            target = (net.ofx.types.x2003.x04.BillerInfo)get_store().add_element_user(BILLERINFO$2);
            return target;
        }
    }
    
    /**
     * Removes the ith "BILLERINFO" element
     */
    public void removeBILLERINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(BILLERINFO$2, i);
        }
    }
}
